import tkinter as tk 
from tkinter import messagebox

win  = tk.Tk()
win.title("C语言中文网")
win.iconbitmap("qianduan\logo.ico")
win.geometry('400x200+100+100')
win.resizable(0,0)

tk.Label(win,text="账号:").grid(row=0)
tk.Label(win,text="密码:").grid(row=1)

e1 = tk.Entry(win)

e2 = tk.Entry(win,show="*")
e1.grid(row=0,column=1,padx=10,pady=5)
e2.grid(row=1,column=1,padx=10,pady=5)

def login():
  messagebox.showinfo("欢迎您的到来")

tk.Button(win,text="登录",width=10,command=login).grid(row=3,column=0,sticky="w",padx=10,pady=5)
tk.Button(win,text="退出",width=10,command=win.quit).grid(row=3,column=1,sticky="e",padx=10,pady=5)

win.mainloop()